3d7a0311dce65e8a749f37512cf87cb7357a21e4,opennms-services/src/main/java/org/opennms/netmgt/poller/monitors/SmtpMonitor.java,SmtpMonitor,poll,#MonitoredService#Map#,132

Before Change


                            // response
                            do {
                                response = rdr.readLine();
                            } while (response != null && !endMultiline.match(response));
                            if (response == null) {
                                continue;
                            }

After Change


                        continue;
                    }

                    if (MULTILINE.matcher(response).matches()) {
                        // Ok we have a multi-line response...first three
                        // chars of the response line are the return code.
                        // The last line of the response will start with
                        // return code followed by a space.
                        String multiLineRC = new String(response.getBytes("ASCII"), 0, 3, "ASCII");

                        // Create new regExp to look for last line
                        // of this multi line response
                        Pattern endMultiline = null;
                        try {
                            endMultiline = Pattern.compile(multiLineRC);
                        } catch (PatternSyntaxException ex) {
                            throw new java.lang.reflect.UndeclaredThrowableException(ex);
                        }

                        // read until we hit the last line of the multi-line
                        // response
                        do {
                            response = rdr.readLine();
                        } while (response != null && !endMultiline.matcher(response).matches());
                        if (response == null) {
                            continue;
                        }